package com.zk.stock.mapper;

import com.zk.stock.pojo.domain.Stock4EvrDayDomain;
import com.zk.stock.pojo.domain.Stock4MinuteDomain;
import com.zk.stock.pojo.domain.StockUpdownDomain;
import com.zk.stock.pojo.entity.StockRtInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 曹自康的Laptop
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2024-06-27 20:31:39
* @Entity com.zk.stock.pojo.entity.StockRtInfo
*/
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);

    List<StockUpdownDomain> getStockInfoByTime(@Param("curDate") Date curDate);

    List<StockUpdownDomain> stockUpdownDomainList();

    /**
     * 统计指定日期范围内股票涨停或者跌停的数据量流水
     * @param startDate
     * @param endDate
     * @param flag 1 涨停 跌停
     * @return
     */

    List<Map> getStockUpDownCount(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("flag") int flag);


    List<Map> getIncreaseRangeInfos(@Param("tEndDate") Date tEndDate);

    List<Stock4MinuteDomain> getScreenTimeSharing(@Param("code") String code, @Param("startDate") Date startDate, @Param("endDate") Date endDate);


    List<Stock4EvrDayDomain> getScreenDkline(@Param("code") String code, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    int inserBatch(@Param("lists") List<StockRtInfo> lists);
}
